<div>
    <table class="table">
        <thead>
            <tr>
                <th :for="th in @tableData.thList">{{@th.label}}</th>
            </tr>
        </thead>
        <tbody :if="@tableData.loading">
            <tr>
                <td :attr="{colspan:@tableData.thList.length}" style="height:40px;" class="aligncenter">
                    <img src="/images/loading.gif" width="20" />
                </td>
            </tr>
        </tbody>
        <tbody :if="@tableData.errMsg">
            <tr >
                <td class="aligncenter"
                    :text="@tableData.errMsg"
                    :attr="{colspan:@tableData.thList.length}"></td>
            </tr>
        </tbody>
        <tbody :if="!@tableData.loading && !@tableData.errMsg">
            <tr :for="tr in @tableData.list">
                <td :for="th in @tableData.thList"
                    :html="avalon.isFunction(@th.text) ? @th.text(@tr) : @tr[@th.text]"></td>
            </tr>
        </tbody>
    </table>
    <xmp is="ms-pagination" ms-widget="{curr:@tableData.curr, totalPage:@tableData.totalPage, jump:@tableData.jump}" ></xmp>
</div>